package com.bf.hotpoint.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.springframework.data.annotation.Id;
import org.springframework.data.geo.Point;

public class Message  implements Serializable{

	private static final long serialVersionUID = -5141371709441945751L;
	@Id
	private String messageId;
	private String uuid;
	private String content;
	private String nickName;
	private String title;
	private List<String> images;
	private boolean isAvailable;
	private boolean hasImage;
	private Set<String> reportedUsers = new HashSet<String>();;
	private int numberOfPraise;
	private int numberOfDespise;
	private Date publishTime;
	private Point location;
	private boolean isReported;
	private List<Reply> replies = new ArrayList<Reply>();
	private Set<String> keyWords = new HashSet<String>();
	private Boolean sex;
	private Boolean hasUserHead;
	private String deviceToken;
	//available time
	private Date availableTime;
	public String getMessageId() {
		return messageId;
	}
	public void setMessageId(String messageId) {
		this.messageId = messageId;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public List<String> getImages() {
		return images;
	}
	public void setImages(List<String> images) {
		this.images = images;
	}
	public boolean isAvailable() {
		return isAvailable;
	}
	public void setAvailable(boolean isAvailable) {
		this.isAvailable = isAvailable;
	}
	
	public int getNumberOfPraise() {
		return numberOfPraise;
	}
	public void setNumberOfPraise(int numberOfPraise) {
		this.numberOfPraise = numberOfPraise;
	}
	public int getNumberOfDespise() {
		return numberOfDespise;
	}
	public void setNumberOfDespise(int numberOfDespise) {
		this.numberOfDespise = numberOfDespise;
	}
	public Point getLocation() {
		return location;
	}
	public void setLocation(Point location) {
		this.location = location;
	}
	public List<Reply> getReplies() {
		return replies;
	}
	public void setReplies(List<Reply> replies) {
		this.replies = replies;
	}
	public Set<String> getKeyWords() {
		return keyWords;
	}
	public void setKeyWords(Set<String> keyWords) {
		this.keyWords = keyWords;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public boolean isHasImage() {
		return hasImage;
	}
	public void setHasImage(boolean hasImage) {
		this.hasImage = hasImage;
	}
	public Set<String> getReportedUsers() {
		return reportedUsers;
	}
	public void setReportedUsers(Set<String> reportedUsers) {
		this.reportedUsers = reportedUsers;
	}
	public String getUuid() {
		return uuid;
	}
	public void setUuid(String uuid) {
		this.uuid = uuid;
	}
	public Date getAvailableTime() {
		return availableTime;
	}
	public void setAvailableTime(Date availableTime) {
		this.availableTime = availableTime;
	}
	public Date getPublishTime() {
		return publishTime;
	}
	public void setPublishTime(Date publishTime) {
		this.publishTime = publishTime;
	}
	public String getNickName() {
		return nickName;
	}
	public void setNickName(String nickName) {
		this.nickName = nickName;
	}
	public Boolean getHasUserHead() {
		return hasUserHead;
	}
	public void setHasUserHead(Boolean hasUserHead) {
		this.hasUserHead = hasUserHead;
	}
	public Boolean getSex() {
		return sex;
	}
	public void setSex(Boolean sex) {
		this.sex = sex;
	}
	
	public String getDeviceToken() {
		return deviceToken;
	}
	public void setDeviceToken(String deviceToken) {
		this.deviceToken = deviceToken;
	}
	
	
	public boolean isReported() {
		return isReported;
	}
	public void setReported(boolean isReported) {
		this.isReported = isReported;
	}
	@Override
    public String toString() {
        return String.format(
                "Message[  uuid='%s', content='%s', availableTime='%s', messageId='%s' ,x='%s' , y ='%s']",
                  this.getUuid(),this.getContent(),this.getAvailableTime().toString(),this.getMessageId(),this.getLocation().getX(),this.getLocation().getY());
    }
	
}
